﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using YakShaver.Contract;
namespace YakShaver.Tests.DummyObjects
{
    public class INotificationDummyService : INotificationService
    {
        #region INotificationService Members

        public int NotifyForInterventionMethodCallCount = 0;
        public int HandleWorkItemModifedEventCallCount = 0;

        public event EventHandler<WorkItemModifiedEventArgs> HandleWorkItemModifiedEvent;

        public bool NotifyForIntervention(int nofityCount, IWorkItemDataContract workItemDataContract)
        {
            NotifyForInterventionMethodCallCount++;
            return true;
        }

        public void RaiseWorkItemModifiedEvent(Guid instanceId)
        {
            HandleWorkItemModifedEventCallCount++;
            if (HandleWorkItemModifiedEvent != null)
                HandleWorkItemModifiedEvent(null,
                    new WorkItemModifiedEventArgs(instanceId, new WorkItemDataContractDummyObject() { PageId = "/home/test2.aspx" }));

        }

        #endregion
    }
}
